<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('index')}">部门列表</a></li>
			<li class="active"><a>添加部门</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('add')}">
			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>部门名称</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-name" name="name">
				</div>
			</div>
			<Notempty name="default">
			<div class="form-group">
				<label for="input-parent_id" class="col-sm-2 control-label"><span class="form-required">*</span>所属部门</label>
				<div class="col-md-6 col-sm-10">
					<input class="form-control" type="text" style="width:400px;" required value="{$default.name}"
						   placeholder="请选择所属部门" onclick="doSelectLayer(this);"
						   data-url="{:url('select')}" data-id="input-parent_id" name="layer_temp[0]"
						   readonly/>
					<input class="form-control" type="hidden" value="{$default.id}" name="parent_id"
						   id="input-parent_id"/>
				</div>
			</div>
			</Notempty>
			<div class="form-group">
				<label  class="col-sm-2 control-label">是否为公司</label>
				<div class="col-md-6 col-sm-10">
					<label class="radio-inline">
						<input type="radio" name="is_company" value="1"> 是
					</label>
					<label class="radio-inline">
						<input type="radio" name="is_company" value="0" checked> 否
					</label>
				</div>
			</div>
			<div class="form-group">
				<label for="textarea-description" class="col-sm-2 control-label">部门描述</label>
				<div class="col-md-6 col-sm-10">
					<textarea id="textarea-description" name="description" class="form-control" rows="5"></textarea>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
					<a class="btn btn-default" href="javascript:history.back(-1);">返回</a>
				</div>
			</div>
		</form>
	</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>